/*********************************************************************
Replication file for:
Sønderskov, Kim Mannemar (2011).
"Does Generalized Social Trust Lead to Associational Membership?
Unravelling a Bowl of Well-Tossed Spaghetti".
European Sociological Review, 27(4): 419-434.
*********************************************************************/
version 14
*cd XXXX
use "Does Generalized Social Trust...Replication Data.dta"
xtset country
********************************************************
*Table 1*
********************************************************
*Art, humanitarian, environmental etc.
*Model 1
xtlogit ahe_i gt edu gender age satfin lrscale lifesat immi selfeffi ///
	pm income  pro_rel oth_rel,fe or
est store ahe_1
*Model 2
xtlogit ahe_i gt edu gender age satfin lrscale lifesat immi selfeffi ///
	pm income  pro_rel oth_rel if age<24,fe or
est store ahe_2

*Labor union
*Model 3
xtlogit union_i gt edu gender age satfin lrscale lifesat immi selfeffi ///
	pm income  pro_rel oth_rel,fe or
est store uni_1
*Model 4
xtlogit union_i gt edu gender age satfin lrscale lifesat immi selfeffi ///
	pm income  pro_rel oth_rel if age < 24,fe or
est store uni_2

*Political party
*Model 5
xtlogit pol_i gt edu gender age satfin lrscale lifesat immi selfeffi ///
	pm income  pro_rel oth_rel,fe or
est store pol_1
*Model 6
xtlogit pol_i gt edu gender age satfin lrscale lifesat immi selfeffi ///
	pm income  pro_rel oth_rel if age <24 ,fe or
est store pol_2

*Professional association
*Model 7
xtlogit prof_i gt edu gender age satfin lrscale lifesat immi selfeffi ///
	pm income pro_rel oth_rel,fe or
est store pro_1
*Model 8
xtlogit prof_i gt edu gender age satfin lrscale lifesat immi selfeffi ///
	pm income  pro_rel oth_rel if age < 24,fe or
est store pro_2

*Church or religious organization
*Model 9
xtlogit church_i gt edu gender age satfin lrscale lifesat immi selfeffi ///
	pm income,fe or
est store ch_1
*Model 10
xtlogit church_i gt edu gender age satfin lrscale lifesat immi selfeffi ///
	pm income if age < 24,fe or
est store ch_2

********Robustness analyses of analyses reported in Table 1**********

/*"Initial analyses confirm the need for this modelling: a test of whether betweencountry
variance is zero yields P-values below 0.0001 for each dependent variable."*/
xtlogit ahe_i
xtlogit union_i
xtlogit pol_i
xtlogit prof_i
xtlogit church_i

/* Note c to Table A2: Education and income are included as linear terms in the analyses; 
this may be dubious as they hardly are truly interval scaled. 
All models have been estimated with education and income entered as categorical
variables instead; this does not change the effects of trust substantially (not shown).*/
xtlogit ahe_i gt i.edu gender age satfin lrscale lifesat immi selfeffi ///
	pm i.income  pro_rel oth_rel,fe or
xtlogit ahe_i gt i.edu gender age satfin lrscale lifesat immi selfeffi ///
	pm i.income  pro_rel oth_rel if age<24,fe or
xtlogit union_i gt i.edu gender age satfin lrscale lifesat immi selfeffi ///
	pm i.income  pro_rel oth_rel,fe or
xtlogit union_i gt i.edu gender age satfin lrscale lifesat immi selfeffi ///
	pm i.income  pro_rel oth_rel if age < 24,fe or
xtlogit pol_i gt i.edu gender age satfin lrscale lifesat immi selfeffi ///
	pm i.income  pro_rel oth_rel,fe or
xtlogit pol_i gt i.edu gender age satfin lrscale lifesat immi selfeffi ///
	pm i.income  pro_rel oth_rel if age <24 ,fe or
xtlogit prof_i gt i.edu gender age satfin lrscale lifesat immi selfeffi ///
	pm i.income  pro_rel oth_rel,fe or
xtlogit prof_i gt i.edu gender age satfin lrscale lifesat immi selfeffi ///
	pm i.income pro_rel oth_rel if age < 24,fe or
xtlogit church_i gt i.edu gender age satfin lrscale lifesat immi selfeffi ///
	pm i.income,fe or
xtlogit church_i gt i.edu gender age satfin lrscale lifesat immi selfeffi ///
	pm i.income if age < 24,fe or

/*Note 10: "Religious orientation and affiliation were excluded
in Models 9 and 10 due to obvious endogeneity between affiliation and membership.
I did, however, include it in models with only Protestants vs. other denominations.
The effect of trust was smaller in these models"*/
*Model 9a*
xtlogit church_i gt edu gender age satfin lrscale lifesat immi selfeffi ///
	pm income oth_rel if pro_rel !=1, fe or
*Model 10a*
xtlogit church_i gt edu gender age satfin lrscale lifesat immi selfeffi ///
	pm income oth_rel if pro_rel !=1 & age<24, fe or

/*Note 11: "Although the effect of trust is larger in Models 1
and 2 compared to all other models with similar
samples, it should be noted that the trust’s
coefficients do not differ significantly between
Models 1 and 3, 1 and 5, and 2 and 6."*/
suest ch_1 ahe_1
test [ch_1_church_i=ahe_1_ahe_i]: gt
suest ch_2 ahe_2
test [ch_2_church_i=ahe_2_ahe_i]: gt
suest pro_1 ahe_1
test [pro_1_prof_i=ahe_1_ahe_i]: gt
suest pro_2 ahe_2
test [pro_2_prof_i=ahe_2_ahe_i]: gt
suest uni_1 ahe_1
test [uni_1_union_i=ahe_1_ahe_i]: gt
suest uni_2 ahe_2
test [uni_2_union_i=ahe_2_ahe_i]: gt
suest pol_1 ahe_1
test [pol_1_pol_i=ahe_1_ahe_i]: gt
suest pol_2 ahe_2
test [pol_2_pol_i=ahe_2_ahe_i]: gt

*****************************************
*Table A1*********************
*****************************************
format gt church_i union_i pol_i prof_i ahe_i %3.2f
preserve
collapse (mean) gt church_i union_i pol_i prof_i ahe_i, by(country)
list country ahe_i union_i pol_i prof_i church_i gt ,
restore
preserve
collapse (mean) gt church_i union_i pol_i prof_i ahe_i if age<24, by(country)
list country ahe_i union_i pol_i prof_i church_i gt ,
restore

*****************************************
*Table A2*********************
*****************************************
*Descriptive statistics
summarize edu gender age income satfin selfeffi immi ///
	pm  lrscale lifesat pro_rel oth_rel no_rel 
summarize edu gender age income satfin selfeffi immi ///
	pm  lrscale lifesat pro_rel oth_rel no_rel if age < 24


exit
